<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
   <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
   <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function removeMenu(){
		document.getElementById("removeMenu").submit();
	}
</script>
<title>Favouries Page</title>
</head>
<body>
<jsp:include page="top-nav-bar.jsp"/>

<div class="container">
  <div class="header">
  	<img class="header-image" src="img/header-image.png" alt="Cherry" name="header_image" id="header_image"/>
  </div><!-- end .header -->
  
  <div class="main-navigation">
  	<c:import url="WEB-INF/xml/diet.xml" var="xmlDietDoc"/>
	<c:import url="style-sheet/diet.xsl" var="xslDietDoc"/>
	<x:transform xml="${xmlDietDoc}" xslt="${xslDietDoc}"/>
	
  	<c:import url="WEB-INF/xml/recipe.xml" var="xmlRecipeDoc"/>
	<c:import url="style-sheet/recipe.xsl" var="xslRecipeDoc"/>
	<x:transform xml="${xmlRecipeDoc}" xslt="${xslRecipeDoc}"/>			
  </div>
  <div class="menu-category"><h3>Your Favouries Menu</h3></div>
  
  
  <div class="menu-container">
  	<c:forEach var="menuVMO" items="${MENUVMOLIST}">
  		<div class="menu-top">
            <a href="MenuClientServlet?id=${menuVMO.menu.id}&amp;day=${menuVMO.day}&amp;mealNum=${menuVMO.menu.numbermeal}&amp;dayNum=${menuVMO.menu.numberday}">
            	<img src="${menuVMO.menu.imgPath}" alt="${menuVMO.menu.name}"/>
            </a>
            <h5><a href="menu-details.jsp?id=${menuVMO.menu.id}">${menuVMO.menu.name}</a></h5>
            <form id="removeMenu" action="UserServlet" method="post">
            	<input type="hidden" name="action" value="removeMenu" />
            	<input type="hidden" name="menuId" value="${menuVMO.menu.id}" />
            </form>
            <a href="#" onclick="removeMenu()">Remove menu out of favouries</a>
        </div>
  	</c:forEach>
  </div>
  
  <div class="footer">
  	<img src="img/fptuniversity.png"/>
    <span style="position:absolute">FPT University</span>
  </div>
</div>
</body>
</html>